//论文
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;

public class Paper {
    static String Name, Writer, Number, BookName,Year, Month, Collection, Credit;
    static ArrayList<String> NameList = new ArrayList<>();
    static ArrayList<String> WriterList = new ArrayList<>();
    static ArrayList<String> NumberList = new ArrayList<>();
    static ArrayList<String> BookNameList = new ArrayList<>();
    static ArrayList<String> YearList = new ArrayList<>();
    static ArrayList<String> MonthList = new ArrayList<>();
    static ArrayList<String> CollectionList = new ArrayList<>();
    static ArrayList<String> CreditList = new ArrayList<>();

    public static void Write() {
        System.out.print("请输入论文名称:");
        Name = Main.in.nextLine();
        NameList.add(Name);
        System.out.print("请输入作者:");
        Writer = Main.in.nextLine();
        WriterList.add(Writer);
        System.out.print("请输入序号:");
        Number = Main.in.nextLine();
        NumberList.add(Number);
        System.out.print("请输入刊物名称:");
        BookName = Main.in.nextLine();
        BookNameList.add(BookName);
        System.out.print("请输入发表年份:");
        Year = Main.in.nextLine();
        YearList.add(Year);
        System.out.print("请输入发表月份:");
        Month = Main.in.nextLine();
        MonthList.add(Month);
        System.out.print("请输入收录情况:");
        Collection = Main.in.nextLine();
        CollectionList.add(Collection);
        System.out.print("请输入学分制:");
        Credit = Main.in.nextLine();
        CreditList.add(Credit);

        try {
            BufferedWriter PaperWrite = new BufferedWriter(new FileWriter("data/Paper.txt", true));
            PaperWrite.newLine();
            PaperWrite.write(Name);
            PaperWrite.write("    ");
            PaperWrite.write(Writer);
            PaperWrite.write("    ");
            PaperWrite.write(Number);
            PaperWrite.write("    ");
            PaperWrite.write(BookName);
            PaperWrite.write("    ");
            PaperWrite.write(Year);
            PaperWrite.write(".");
            PaperWrite.write(Month);
            PaperWrite.write("    ");
            PaperWrite.write(Collection);
            PaperWrite.write("    ");
            PaperWrite.write(Credit);
            PaperWrite.close();
        } catch (IOException e) {
            e.printStackTrace();
        }

    }

    public static void Check() {

    }

    public static void View() {

    }
}
